package com.zxmc.server.mapper;

import com.zxmc.aop.AutoFill;
import com.zxmc.enumeration.OperationType;
import com.zxmc.pojo.entity.Friend;
import com.zxmc.pojo.entity.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FriendMapper {
    List<Friend> listById(@Param("userId") Integer userId, @Param("name") String name);

    @AutoFill(OperationType.INSERT)
    void add(Friend friend);


    void delete(@Param("selfId") Integer selfId, @Param("friendId") Integer friendId);

    void update(Friend friend);
}
